var BaseUrl = "http://127.0.0.1:8002/api-wms"
$(function() {
	$.ajaxSetup({
		async: false,
		complete: function(xhr, status) {
			//resetUrl(xhr, status);
		},
		headers: { // 默认添加请求头
			'Authorization': window.localStorage.getItem('access-token')
		},
		beforeSend(xhr) {
			if(arguments[1].url.indexOf('/')===0){
				arguments[1].url = BaseUrl + arguments[1].url;
			}else{
				arguments[1].url = BaseUrl +"/"+ arguments[1].url;
			}
			
		}
	});
});
